import router from '@/router'

export default function useRouterJump(path: string, query: any = {}, cb?: () => void) {
  if (path === 'back') {
    router.back()
  } else {
    router.push({ path, query })
  }
  cb && cb()
}
